package sample.controller.category;

import java.util.List;
import java.util.logging.Logger;
import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;
import org.slim3.datastore.Datastore;

import sample.controller.meta.CategoryMeta;
import sample.controller.model.Category;

public class IndexController extends Controller {

    @SuppressWarnings("unused")
    private static final Logger logger = Logger.getLogger(IndexController.class.getName());

    @Override
    public Navigation run() {
        CategoryMeta meta = new CategoryMeta();
        List<Category> list = Datastore.query(meta).asList();
        requestScope("list", list);
        return forward("index.jsp");
    }
}
